package com.ys.entity.business;

import javax.persistence.Table;


import java.util.Date;

import com.ys.entity.base.BaseEntity;

/**
*/
@Table(name="`ys_product`", catalog="id")
public class YsProduct extends BaseEntity<YsProduct> {

	private Long id; // 主键ID
	private Integer sourceType; // 来源类型
	private Long sourceId; // 
	private String asin; // 商品唯一标识码
	private String title; // 商品标题
	private String img; // 封面图
	private Integer stateOnAmazon; // 亚马逊上架状态
	private Integer stateOnGroup; // 产品图入库状态，见ENUM，0未入库1已入库
	private Integer status; // 
	private Date createTime; // 
	private Date updateTime; // 

	public Long getId() {
		return id;
	}
	public YsProduct setId(Long id) {
		this.id = id;
		return this;
	}
	public Integer getSourceType() {
		return sourceType;
	}
	public YsProduct setSourceType(Integer sourceType) {
		this.sourceType = sourceType;
		return this;
	}
	public Long getSourceId() {
		return sourceId;
	}
	public YsProduct setSourceId(Long sourceId) {
		this.sourceId = sourceId;
		return this;
	}
	public String getAsin() {
		return asin;
	}
	public YsProduct setAsin(String asin) {
		this.asin = asin;
		return this;
	}
	public String getTitle() {
		return title;
	}
	public YsProduct setTitle(String title) {
		this.title = title;
		return this;
	}
	public String getImg() {
		return img;
	}
	public YsProduct setImg(String img) {
		this.img = img;
		return this;
	}
	public Integer getStateOnAmazon() {
		return stateOnAmazon;
	}
	public YsProduct setStateOnAmazon(Integer stateOnAmazon) {
		this.stateOnAmazon = stateOnAmazon;
		return this;
	}
	public Integer getStateOnGroup() {
		return stateOnGroup;
	}
	public YsProduct setStateOnGroup(Integer stateOnGroup) {
		this.stateOnGroup = stateOnGroup;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public YsProduct setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public YsProduct setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public YsProduct setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static YsProduct ysProduct(
		Integer sourceType,
		Long sourceId,
		String asin,
		String title,
		String img,
		Integer stateOnAmazon,
		Integer stateOnGroup,
		Integer status
			) {
		YsProduct entity = new YsProduct();
		entity.setSourceType(sourceType);
		entity.setSourceId(sourceId);
		entity.setAsin(asin);
		entity.setTitle(title);
		entity.setImg(img);
		entity.setStateOnAmazon(stateOnAmazon);
		entity.setStateOnGroup(stateOnGroup);
		entity.setStatus(status);
		return entity;
	}
}